import 'package:flutter/material.dart';

class HomeNav extends StatelessWidget {
 HomeNav({ super.key,required this.navList });

  List navList =[];
  @override
  Widget build(BuildContext context){
    return GridView(
      padding: EdgeInsets.all(10),
      shrinkWrap: true,
      physics: const NeverScrollableScrollPhysics(),
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 5,
        mainAxisSpacing: 0, 
        crossAxisSpacing: 0, 
        childAspectRatio: 1, 
        ),
      children: navList.map((item){
        return Container(
          child: Column(
            children: [
              Image.network(item['imgUrl'],width: 46,height: 46,),
              Padding(
                padding: EdgeInsets.only(top: 5),
                child: Text(item['text'],style: TextStyle(fontSize: 12),),
              ),
            ],
          ),
        );
      }).toList(),
    );
  }
}
